using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using NHibernate.Expression;

namespace WOODIFramework.Model
{
    [ActiveRecord("TextBox")]
    public class TextBox : PageItem
    {
        #region Fields

        private Guid _textBoxId;
        private string _tooltip;
        private string _textBoxText;

        #endregion

        #region Properties

        [JoinedKey("textBoxID")]
        public Guid TextBoxId
        {
            get { return _textBoxId; }
            set { _textBoxId = value; }
        }

        [Property]
        public string TextBoxText
        {
            get { return _textBoxText; }
            set { _textBoxText = value; }
        }

        [Property]
        public string Tooltip
        {
            get { return _tooltip; }
            set { _tooltip = value; }
        }

        #endregion

        #region Constructors

        private TextBox()
        {
            this.Id = Guid.NewGuid();
            this.TextBoxId = this.Id;
        }


        private TextBox(string Name)
        {
            this.Id = Guid.NewGuid();
            this.TextBoxId = this.Id;
            this.Name = Name;
        }

        private TextBox(string Name, string TextBoxText)
        {
            this.Id = Guid.NewGuid();
            this.TextBoxId = this.Id;
            this.Name = Name;
            this.TextBoxText = TextBoxText;
        }

        #endregion

        #region Public Methods

        #region Public Static Methods

        public static TextBox CreateTextBox()
        {
            return new TextBox();
        }

        public static TextBox CreateTextBox(string Name)
        {
            return new TextBox(Name);
        }

        public static TextBox CreateTextBox(string Name, string TextBoxText)
        {
            return new TextBox(Name, TextBoxText);
        }

        #endregion

        #endregion


    }
}
